package hu.dobrosi.dinkycam.j2me.screens;

import javax.microedition.lcdui.Alert;
import javax.microedition.lcdui.AlertType;
import javax.microedition.lcdui.Display;

//Utility class used to show some information to the user
public class InfoAlert extends Alert {
	public InfoAlert() {
		super("InfoScreen");
	}

	public void showInfo(String message, Display display) {
		setTitle("Info");
		setType(AlertType.INFO);
		setTimeout(3000);
		setString(message);
		display.setCurrent(this);
	}

	public void showError(String message, Display display) {
		setTitle("Error");
		setType(AlertType.ERROR);
		setTimeout(5000);
		setString(message);
		display.setCurrent(this);
	}
}
